package com.example.demo.controller;

import com.example.demo.entity.Product;
import com.example.demo.service.impl.ProductServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class ProductController {
    @Autowired
    public ProductServiceImpl productService;
    @PostMapping("/product")
    public String Insert(@RequestBody Product product){
        productService.add(product);
        return "success";
    }
}
